﻿/**********************************天使物流*******************************************
* 功能描述:登录
* 作者:孟帅龙
* 时间:2022/1/10
* 
**********************************天使物流*******************************************/
using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TianShiProject.JWTHelper;
using TianShiProject.Models.Common;
using TianShiProject.Models.System.Logins;
using TianShiProject.Models.System.Operators;
using Volo.Abp.Application.Services;

namespace TianShiProject.System.Logins
{
    public class DengLuService : ApplicationService
    {
        private readonly IDengLuRepository _dengLuRepository;
        public DengLuService(IDengLuRepository dengLuRepository)
        {
            _dengLuRepository = dengLuRepository;
        }

        [AllowAnonymous]
        public async Task<ResponseModel<DengLuDto>> PostDengLu(DengLuDto dengLuDto)
        {
            return await _dengLuRepository.PostDengLu(dengLuDto);
            //var arr = await _dengLuRepository.PostDengLu(dengLuDto);
            //if (arr.Data != null)
            //{
            //    var login = new DengLuDto();
            //    login.token = TokenManager.GenerateToken("name");
            //    login.Id = arr.Data.Id;
            //    login.Account = arr.Data.Account;
            //    var res = new ResponseModel<DengLuDto>();
            //    res.Data = login;
            //    return res;
            //}
            //return null;
        }
    }
}
